
// eslint-disable-next-line no-unused-vars
export default class Anchor {
  constructor(options = {}) {
    this.id = options.id || `anchor-${Date.now()}`
    this.nodeId = options.nodeId
    this.x = options.x || 0
    this.y = options.y || 0
    this.active = false
  }

  // 转换为JSON
  toJSON() {
    return {
      id: this.id,
      nodeId: this.nodeId,
      x: this.x,
      y: this.y
    }
  }
}